package com.truesai.pages.customer;

import org.apache.tapestry5.EventConstants;
import org.apache.tapestry5.annotations.InjectPage;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.annotations.PageActivationContext;
import org.apache.tapestry5.annotations.Property;

import com.truesai.entities.customer.Customer;

/**
 * 客户信息详细信息页面
 * @author XuLian
 */
public class CustomerDetail {

	@SuppressWarnings("unused")
	@Property
	@PageActivationContext
	private Customer customer;

	@InjectPage
	CustomerEdit editPage;

	/**
	 * Start booking process.
	 * 
	 * @param hotel
	 * @return link to the current hotel booking
	 */
	@OnEvent(value = EventConstants.SUCCESS, component = "startBookingForm")
	Object startBooking(Customer customer)
	{
		editPage.set(customer);
		return CustomerEdit.class;
	}
}
